# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils

MY_P="${PN}-x86Linux-${PV}"

DESCRIPTION="Voodoo Camera Tracker: A tool for the integration of virtual and real scenes."
HOMEPAGE="http://www.digilab.uni-hannover.de/docs/manual.html"
SRC_URI="ftp://ftp.tnt.uni-hannover.de/pub/digilab/${MY_P}.tar.gz"

LICENSE=""

SLOT="0"

KEYWORDS="~x86 ~amd64"

IUSE=""

RESTRICT="mirror strip"

DEPEND="x86? ( x11-libs/libXext
	      x11-libs/libICE
	      x11-libs/libX11
	      x11-libs/libXrandr
	      x11-libs/libSM
	      x11-libs/libXmu
	      x11-libs/libXrender
	      x11-libs/libXt
	      media-libs/mesa )
       amd64? ( app-emulation/emul-linux-x86-xlibs )"

RDEPEND="${DEPEND}"

S="${WORKDIR}/${MY_P}"

src_install() {
    dodir /opt/
    cp -R "${S}/" "${D}/opt/voodoo" || die "Install failed!"
    exeinto /usr/bin
    newexe ${FILESDIR}/voodoo-wrapper.sh voodoo
}